import java.util.*;

public abstract class Hint{
	// Attributes
	protected Unit[] units;
	
	// Abstract methods
	public Hint(){
	}
	
	public Hint(Unit[] units){
		this.units = Arrays.copyOf(units, units.length);
	}
	
	public abstract void applyHint();
	public abstract void applyHint(Unit A, Unit B);
	public abstract String toString();
	
	// Constructor
	public boolean checkHint(){
		return checkHint(units[0], units[1]);
	}
	
	public boolean checkHint(Unit A, Unit B){
		Unit tmpA = (Unit) A.clone();
		Unit tmpB = (Unit) B.clone();
		applyHint(tmpA, tmpB);
		if(tmpA.isEmpty() || tmpB.isEmpty()){
			return false;
		}else{
			return true;
		}
	}
	
	public Unit getUnit(int num){
		if(num <= units.length){
			return units[num];
		}else{
			return null;
		}
	}
}